import { ApiVersoin } from '@/common/enums/httpEnum'

const Url = {
  bestAuthInfo: `/best-sign/auth-info`,
  customerInfoOne: `/customer-info/one`,
  identityOcr: `/best-sign/identity-ocr`,
  reserveTemplate: `${ApiVersoin.V5}/reserve/get-template-rent-info`,
  roomInfo: `/reserve/room-info`,
  signContract: `/sign/sign-contract`,
  companyInfo: `/sign/query-company-info`,
  identity_ocr: `/applet/best-sign-h5/identity-ocr`,
}

// 提交信息接口
export const bestAuthInfo = (data) => uni.$uv.http.post(Url.bestAuthInfo, data, { custom: { showLoading: true } })

// 在线预定
export const customerInfoOne = (params) => uni.$uv.http.get(Url.customerInfoOne, { params, custom: { showLoading: true } })

// 识别身份证
export const identityOcr = (data) => uni.$uv.http.post(Url.identityOcr, data, { custom: { showLoading: true } })

// 签约协议
export const reserveTemplate = (data) => uni.$uv.http.get(Url.reserveTemplate, { data, custom: { showLoading: true } })

// 获取房源信息
export const roomInfo = (params) => uni.$uv.http.get(Url.roomInfo, { params, custom: { showLoading: true } })

// 提交签约接口
export const signContract = (data) => uni.$uv.http.post(Url.signContract, data, { custom: { showLoading: true } })

// 获取搜索公司列表
export const companyInfo = (params) => uni.$uv.http.get(Url.companyInfo, { params, custom: { showLoading: true } })
/**
 * @description: ocr身份证识别
 */
export const identity_ocr = (data) => uni.$uv.http.post(Url.identity_ocr, data, { custom: { showLoading: true, showMessage: false } })
